/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication2;
import java.util.List;
import javax.management.Query;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.api.*;
import javax.management.Query;
import twitter4j.Paging;
/**
 *
 * @author Dayal
 */
public class Main {



    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws TwitterException {
        // TODO code application logic here
   Twitter unauthenticatedTwitter = new TwitterFactory().getInstance();
//First param of Paging() is the page number, second is the number per page (this is capped around 200 I think.
Paging paging = new Paging(1, 100);
List<Status> statuses = unauthenticatedTwitter.getUserTimeline("ddayal219",paging);
for(int index=0;index<statuses.size();index++)
{
    String[] keywords=statuses.get(index).getHashtags();

System.out.println(keywords.length);
if(keywords.length>0)
    System.out.println(keywords[0]);
System.out.println(statuses.get(index).toString());
        }
/*for(int i=0;i<keywords.length;i++)
   {
   System.out.println(Keywords);
   }
*/
    }

}
